package cn.kust.serviceinterestpoint.service.impl;

import cn.kust.serviceinterestpoint.entity.InterestVideo;
import cn.kust.serviceinterestpoint.entity.vo.PictureAndVideoDTO;
import cn.kust.serviceinterestpoint.mapper.InterestVideoMapper;
import cn.kust.serviceinterestpoint.service.InterestVideoService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author microTourism
 * @since 2022-07-25
 */
@Service
public class InterestVideoServiceImpl extends ServiceImpl<InterestVideoMapper, InterestVideo> implements InterestVideoService {

    @Autowired
    InterestVideoMapper videoMapper;


    @Override
    public List<PictureAndVideoDTO> getAllVideosByInterestId(Long interestId) {
        List<PictureAndVideoDTO> videoUrls = videoMapper.selectVideosByInterestId(interestId);
        return videoUrls;
    }
}
